package com.samuel.learning.design.pattern.bridge.app;

import com.samuel.learning.design.pattern.bridge.Abstraction;
import com.samuel.learning.design.pattern.bridge.Implementor;
import com.samuel.learning.design.pattern.bridge.extend.RedefinedAbstraction;
import com.samuel.learning.design.pattern.bridge.impl.AImplementorImpl;
import com.samuel.learning.design.pattern.bridge.impl.BImplementorImpl;

@SuppressWarnings("ALL")
public class App {

    public static void main(String[] args) {

        Implementor implementor = new AImplementorImpl();
        RedefinedAbstraction redefinedAbstraction = new RedefinedAbstraction(implementor);
        redefinedAbstraction.operation();
        redefinedAbstraction.ohterOperation();

        System.out.println("------------------------");

        implementor = new BImplementorImpl();
        redefinedAbstraction = new RedefinedAbstraction(implementor);
        redefinedAbstraction.operation();
        redefinedAbstraction.ohterOperation();

    }
}
